package com.hr.builder;

import org.springframework.stereotype.Component;

import com.espirit.eap.manager.ModelBuilderSupport;
import com.hr.SalaryTicketLeaveEarlyItem;

@Component
public class SalaryTicketLeaveEarylyItemBuilder extends ModelBuilderSupport {
	static final String REALDATE = "realDate";
	static final String MINUTES = "minutes";
	
	
	@Override
	public boolean init() {
		return super.setClass(SalaryTicketLeaveEarlyItem.class, "Leave Early Item", "早退记录");
	}

	@Override
	public void buildFields() {
		super.buildFields();
		addModelField(REALDATE, "Date", "日期");
		addModelField(MINUTES, "Minutes", "早退分钟");
	}
	
	@Override
	protected void setDefaultLayoutButtons() {
	}
	
	@Override
	protected void addSearchFields() {
	}
	
	@Override
	protected void addListFields() {
		addListField(convertPropertyToField(REALDATE, MINUTES));
	}
	
	@Override
	protected void addDetailFields() {
		addDetailField(convertPropertyToField(REALDATE, MINUTES));
	}
	
	
	@Override
	protected void gatherExproperties() {
		exProperties.put(REQUIRED, new String[]{MINUTES,REALDATE});
	}
}
